package com.example.newone.controller;


import com.example.newone.dao.ScoreDao;
import com.example.newone.service.ScoreService;
import com.example.newone.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/score")
@Slf4j
@Api("分数接口")
public class ScoreController {

    @Autowired
    private ScoreService scoreService;

    @ApiOperation(value = "11111",notes = "111111")
    @GetMapping("/list")
    public R findScore(){
        List<ScoreDao> score = scoreService.findScore();
        return R.ok().put("message",score);
    }

}
